<!--datagrid列表-->
<table id="<{:html_id('datagrid')}>" data-menu="#<{:html_id('datagrid-menu')}>" data-toolbar="#<{:html_id('datagrid-toolbar')}>" data-title="<{$title}>" data-url="<{:U(CONTROLLER_NAME . '/' . ACTION_NAME, array('grid'=>'datagrid'))}>">
	<thead>
		<tr>
			<th data-options="field:'username',width:100,sortable:true">用户名</th>
			<th data-options="field:'time',width:100,sortable:true">登录时间</th>
			<th data-options="field:'httpuseragent',width:250,sortable:true">浏览器标识</th>
			<th data-options="field:'ip',width:100,sortable:true">IP</th>
		</tr>
	</thead>
</table>

<!--工具栏-->
<div id="<{:html_id('datagrid-toolbar')}>">
	<!--搜索-->
	<a class="easyui-linkbutton toolbar-search" data-data="[
		{name:'开始时间',field:'time.begin', editor:{type:'datetimebox',options:{editable:false}},group:'登录时间'},
		{name:'结束时间',field:'time.end', editor:{type:'datetimebox',options:{editable:false}},group:'登录时间'},
		{name:'浏览器标识',field:'httpuseragent', editor:'text',group:'其他'},
		{name:'IP地址',field:'ip', editor:'text',group:'其他'}
	]" data-close="true" data-group="true" data-width="400" data-height="260" iconCls="fa fa-search" plain="true">搜索</a>

	<!--操作项-->
	<foreach name="toolbars" item="li">
		<a class="easyui-linkbutton toolbar-action" data-action="<{$li.a}>" iconCls="<{$li.icon}>" plain="true" data-href="<{:U($li['c'] . '/' . $li['a'] . '?' . $li['data'])}>"><{$li.name}></a>
	</foreach>
</div>

<!--右键菜单-->
<if condition="count($toolbars) gt 0">
	<div id="<{:html_id('datagrid-menu')}>" class="easyui-menu">
		<foreach name="toolbars" item="li">
			<div class="menu-action" data-action="<{$li.a}>" data-href="<{:U($li['c'] . '/' . $li['a'] . '?' . $li['data'])}>" iconCls="<{$li.icon}>"><{$li.name}></div>
		</foreach>
	</div>
</if>

<script type="text/javascript">
	require(['panel/login'], function(module){
		module.init("#<{:html_id('datagrid')}>");
	});
</script>